<?php $this->load->view('admin/common/pageHead'); ?>
<?php $this->load->view('admin/common/pageHeader'); ?>

<div class="fLeft">
	<?php $this->load->view('admin/common/left_nav'); ?>
</div>

<div class="fRight" style="margin: 50px 290px 0px 50px">
	<table
		style="border-color: #EAC8B3; border-left: 1px solid #EAC8B3; border-right: 1px solid #EAC8B3; border-style: solid; border-width: 1px;"
		align="center">



		<tbody>

			<tr>
				<td colspan="3" class="fotter-color" align="center"><b>Add Event</b>
				</td>
			</tr>
			<tr>
				<td colspan="3" class="style2" align="left">
					<form name="form1" action="/insertEvent" method="post"
						onSubmit="return addEvent();">

						<table border="0" cellpadding="0" cellspacing="0" height="25"
							width="400" align="center">
							<tr>
								<td class="tdclass" width="150">Event Name:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<td><input name="eventName" class="form_input" id="eventName"
									size="18" value="" type="text"></td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Event Address:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<td><input name="eventAdd" class="form_input" id="eventAdd"
									size="18" value="" type="text"></td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Event Start Date:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<td><input name="eventStartDate" class="form_input"
									id="eventStartDate" size="18" value="" type="text" readonly></td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Event End Date:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<td><input name="eventEndDate" class="form_input"
									id="eventEndDate" size="18" value="" type="text" readonly></td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Event Start Time:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<!--<td><input name="eventStartT" class="form_input" id="eventStartT" size="18" value="" type="text"></td>-->
								<td valign="middle"><select name="eventStarthour"
									class="form_input" id="eventStarthour">
										<option value="">Hour</option>
										<option value="01">01</option>
										<option value="02">02</option>
										<option value="03">03</option>
										<option value="04">04</option>
										<option value="05">05</option>
										<option value="06">06</option>
										<option value="07">07</option>
										<option value="08">08</option>
										<option value="09">09</option>
										<option value="10">10</option>
										<option value="11">11</option>
										<option value="12">12</option>

								</select> &nbsp; <select name="eventStartMinute"
									class="form_input" id="eventStartMinute">
										<option value="">Minute</option>
										<? for ($i = 0; $i <= 60; $i=$i+5) {?>
										<?php if($i==0 || $i==5){?>
										<option value="<?= '0'.$i; ?>">
											<?= '0'.$i; ?>
										</option>
										<?php } else{ ?>
										<option value="<?= $i; ?>">
											<?= $i; ?>
										</option>
										<? } 
}?>
								</select> &nbsp; <select name="eventStartType"
									class="form_input" id="eventStartType">
										<option value="AM">AM</option>
										<option value="PM">PM</option>
								</select>
								</td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Event End Time:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<!--<td><input name="eventEndT" class="form_input" id="eventEndT" size="18" value="" type="text"></td>-->
								<td valign="middle"><select name="eventEndhour"
									class="form_input" id="eventEndhour">
										<option value="">Hour</option>
										<option value="01">01</option>
										<option value="02">02</option>
										<option value="03">03</option>
										<option value="04">04</option>
										<option value="05">05</option>
										<option value="06">06</option>
										<option value="07">07</option>
										<option value="08">08</option>
										<option value="09">09</option>
										<option value="10">10</option>
										<option value="11">11</option>
										<option value="12">12</option>
								</select> &nbsp; <select name="eventEndMinute"
									class="form_input" id="eventEndMinute">
										<option value="">Minute</option>
										<? for ($i = 0; $i <= 60; $i=$i+5) {?>
										<?php if($i==0 || $i==5){?>
										<option value="<?= '0'.$i; ?>">
											<?= '0'.$i; ?>
										</option>
										<?php } else{ ?>
										<option value="<?= $i; ?>">
											<?= $i; ?>
										</option>
										<? } 
}?>
								</select> &nbsp; <select name="eventEndType" class="form_input"
									id="eventEndType">
										<option value="AM">AM</option>
										<option value="PM">PM</option>
								</select>
								</td>
							</tr>

							<tr>
								<td class="tdclass" colspan="2" width="150"></td>
							</tr>

							<tr>
								<td class="tdclass" colspan="2" width="150"></td>
							</tr>
							<tr>
								<td class="tdclass" colspan="2" width="150"></td>
							</tr>
							<tr>
								<td colspan="10" height="58" align="center"><input name="insert"
									class="form_input" id="update" value="ADD" type="submit">&nbsp;<input
									value="Cancel" class="" onclick="javascript:history.back();"
									type="reset">
								</td>
							</tr>
						</table>
					</form>
				</td>
			</tr>
	
	</table>


</div>
<div class="clr"></div>
</br>
<link rel="stylesheet"
	type="text/css" media="all" href="/public/calendar/jsDatePick.css" />
<script
	type="text/javascript" src="/public/calendar/jsDatePick.full.1.1.js"></script>
<script type="text/javascript">
                        window.onload = function() {
                            new JsDatePick({
                                useMode: 2,
                                target: "eventStartDate"
                                        //limitToToday:true <-- Add this should you want to limit the calendar until today.
                            });

                            new JsDatePick({
                                useMode: 2,
                                target: "eventEndDate"
                                        //limitToToday:true <-- Add this should you want to limit the calendar until today.
                            });
                        };
</script>
<script type="text/javascript">
    function addEvent()
    {
        if (document.form1.eventName.value == '')
        {
            alert("Please Add a Event Name ");
            document.form1.eventName.focus();
            return false;
        }
        if (document.form1.eventAdd.value == '')
        {
            alert("Please Add a Event Address ");
            document.form1.eventAdd.focus();
            return false;
        }
        if (document.form1.eventStartDate.value == '')
        {
            alert("Please Add a Event Start Date");
            document.form1.eventStartDate.focus();
            return false;
        }
        if (document.form1.eventEndDate.value == '')
        {
            alert("Please Add a Event End Date ");
            document.form1.eventEndDate.focus();
            return false;
        }
        if (document.form1.eventStarthour.value == '')
        {
            alert("Please Select Start Hour ");
            document.form1.eventStarthour.focus();
            return false;
        }
        if (document.form1.eventStartMinute.value == '')
        {
            alert("Please Select Start Minute ");
            document.form1.eventStartMinute.focus();
            return false;
        }
        if (document.form1.eventStartType.value == '')
        {
            alert("Please Select AM or PM ");
            document.form1.eventStartType.focus();
            return false;
        }
        if (document.form1.eventEndhour.value == '')
        {
            alert("Please Select End Hour ");
            document.form1.eventEndhour.focus();
            return false;
        }
        if (document.form1.eventEndMinute.value == '')
        {
            alert("Please Select End Minute ");
            document.form1.eventEndMinute.focus();
            return false;
        }
        
        if (document.form1.eventEndType.value == '')
        {
            alert("Please Select AM or PM ");
            document.form1.eventEndType.focus();
            return false;
        }
        
        
        
    }
</script>
<?php $this->load->view('admin/common/pageFooter'); ?>